
<table border = 2>
<tr>
<td>
<a href="main.php?page=login.html" > Logout</a>
<br>
<a href="http://en.wikipedia.org/wiki/Uno_(game)" > Read the rules</a>
<br>
<a href="ranking.php"> See the ranking</a>
<br>
<a href="profile.php"> Change profile</a>
<br>
<a href="createGame.php"> Create game</a>
<br>
<a href="invitations.php"> Received invitations</a>
</td>
<td>
<?php
$hostDB = "localhost";
$userDB = "ampersand";
$passDB = "palomitas";
$dbnameDB = "LYONUNO";

$canalDB = mysql_connect($hostDB, $userDB, $passDB);
$db = mysql_select_db($dbnameDB);
$consulta = 'select name from GAME where available = \'y\' order by name asc';

$resDB = mysql_db_query($dbnameDB, $consulta,$canalDB);

echo "<table border = 2>";
echo "<tr><td><h3> List of available games </h3></td>";
while($row = mysql_fetch_object($resDB)){
	$name = $row->name;
	echo "<tr><td>" . $name ."</td></tr>";
}
echo "</table>";
mysql_free_result($resDB);
mysql_close($canalDB);
?>
</td>
</tr>
</table>
